home *** CD-ROM | disk | FTP | other *** search
/ 100 Best Shareware & Freeware Games / 100 Games.iso / Cards / PySol / pysol460.exe / {app} / pysol.pyw < prev    next >
Encoding:
Text File  |  2001-07-27  |  2.1 KB  |  62 lines

  1. #! /usr/bin/env python
  2. ##
  3. ##---------------------------------------------------------------------------##
  4. ##
  5. ## PySol -- a Python Solitaire Game Collection
  6. ##
  7. ## Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
  8. ## Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
  9. ## Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
  10. ##
  11. ## This program is free software; you can redistribute it and/or modify
  12. ## it under the terms of the GNU General Public License as published by
  13. ## the Free Software Foundation; either version 2 of the License, or
  14. ## (at your option) any later version.
  15. ##
  16. ## This program is distributed in the hope that it will be useful,
  17. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19. ## GNU General Public License for more details.
  20. ##
  21. ## You should have received a copy of the GNU General Public License
  22. ## along with this program; see the file COPYING.
  23. ## If not, write to the Free Software Foundation, Inc.,
  24. ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  25. ##
  26. ## Markus F.X.J. Oberhumer
  27. ## <markus.oberhumer@jk.uni-linz.ac.at>
  28. ## http://wildsau.idv.uni-linz.ac.at/mfx/pysol/
  29. ## http://pysol.tsx.org
  30. ##
  31. ##---------------------------------------------------------------------------##
  32.  
  33. ###
  34. ###  This is just a convenience loader for the byte-compiled version.
  35. ###  The full source code can be obtained from the PySol home page.
  36. ###
  37.  
  38. import imp, os, sys
  39.  
  40. # set sys.path to avoid other Python installations
  41. ##prefix = sys.exec_prefix
  42. prefix = sys.path[0]
  43. if prefix:
  44.     prefix = os.path.normpath(prefix)
  45. lib = (prefix or ".") + "\\python"
  46. sys.path = [prefix]
  47. for dir in ("Lib", "Lib\\lib-tk", "Lib\\Plat-Win", "DLLs"):
  48.     sys.path.append("%s\\%s" % (lib, dir))
  49.  
  50. # setup Tkinter
  51. os.putenv("TCL_LIBRARY", lib + "\\DLLs\\tcl8.3")
  52. os.putenv("TK_LIBRARY", lib + "\\DLLs\\tk8.3")
  53.  
  54. # cleanup
  55. del dir, lib, prefix
  56.  
  57. # start PySol
  58. sys.path[0] = os.path.normpath(os.path.join(sys.path[0], "data"))
  59. sys.argv[0] = os.path.normpath(os.path.join(sys.path[0], "pysol.pyc"))
  60. imp.load_compiled("__main__", sys.argv[0])
  61.  
  62.